import request from '@/utils/request'
/* eslint-disable */


/**
 * 获取计费列表
 * @returns 
 */

export function getRuleListAPI(params){
    return request({
        url: '/parking/rule/list',
        params
    })
}


/**
 * 添加计费规则
 * @param {*} data 
 * @returns 
 */

export function addFeeRuleAPI(data){
    return request({
        url: '/parking/rule',
        method: 'post',
        data
    })
}

/**
 * 删除计费规则
 * @param {} id 
 * @returns 
 */

export function deleteRuleAPI(id){
    return request({
        url:`parking/rule/${id}`,
        method: 'DELETE',
        
    })
}
/**
 * 编辑计费规则
 * @param {*} data 
 * @returns 
 */

export function editRuleAPI(data){
    return request({
        url: '/parking/rule',
        method: 'PUT',
        data
    })
}


/**
 * 获取计费规则详情
 *
 * @export
 * @param {*} id
 * @return {*}
 */
export function getParkingRuleAPI(id) {
  return request({
    url: `/parking/rule/${id}`
  })
}